#ifndef ZZ_SOCKET2_H
#define ZZ_SOCKET2_H

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include "include/jni.h"
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <netdb.h>

#define SERVER_PORT 20068

class Socket2 {
private:
    char host[128];
    int sock_fd;
    int connected;
    struct sockaddr_in sa_server;
public:
    Socket2();
    ~Socket2();
    int open_s(const char* address, short port);
    void close_s();
    int write_s(const char* s,int size);
    int read_s(char* s, int size);
};

#endif //SMART_CABINET_SOCKET2_H
